﻿/*
{
"状态":1,
"名称":"获取-用户权限",
"作者":"陈泽椿",
"创建时间":"2018-06-30",
"功能":"获取-用户权限",
"log": [
	{"date":"06-01" , "dev" :"hzhh" , "content" : ""}
]
}
*/
declare @user_key int
set @user_key='{user_key}'
select user_name,y_user.user_key,role_name,y_role.role_key,y_power.power_key,power_name,power_id
from y_user,y_role_user,y_role,y_role_power,y_power
where 1=1
and y_user.user_key = @user_key
and y_user.user_key = y_role_user.user_key
and y_role_user.role_key = y_role.role_key
and y_role_power.role_key = y_role.role_key
and y_role_power.power_key = y_power.power_key